www.gusucode.com > 茶都拼客网全功能版 8 > 茶都拼客网全功能版 8.8源码程序/teasdxmccom/茶都拼客网V8.8(全功能,无限制,完全开源)/Ku_type/Index_login.asp
<% sub SaveCookie_aspbar_user() Response.Cookies("Ku_USER")("User_Name")=rs("username") Response.Cookies("Ku_USER")("User_Pwd")=rs("password") Response.Cookies("Ku_USER")("ku_vip")=rs("uservip") select case CookieDate case 0 Response.Cookies("Ku_USER")("CookieDate") = CookieDate case 1 Response.Cookies("Ku_USER").Expires=Date+1 Response.Cookies("Ku_USER")("CookieDate") = CookieDate case 2 Response.Cookies("Ku_USER").Expires=Date+31 Response.Cookies("Ku_USER")("CookieDate") = CookieDate case 3 Response.Cookies("Ku_USER").Expires=Date+365 Response.Cookies("Ku_USER")("CookieDate") = CookieDate end select end sub %> <% function Checkin(s) s=trim(s) s=replace(s," ","&nbsp;") s=replace(s,"'","&#39;") s=replace(s,"""","&quot;") s=replace(s,"<","&lt;") s=replace(s,">","&gt;") Checkin=s end function if request("Action")="logincheck" then server_v1=Cstr(Request.ServerVariables("HTTP_REFERER")) server_v2=Cstr(Request.ServerVariables("SERVER_NAME")) if mid(server_v1,8,len(server_v2))<>server_v2 then Response.Write("<script language=javascript>alert('你提交的路径有误,禁止从站点外部提交数据请不要乱改参数!');this.location.href='index.asp';</script>") response.end end if username=Checkin(trim(Request.form("username"))) password=Checkin(replace(trim(Request.Form("password")),"'","''")) CookieDate=request.form("CookieDate") Md5_Pass=md5(password) Ku_CheckCode=replace(trim(Request("CheckCode")),"'","") if username="" or password="" then Response.Write "<script>alert(""用户名或密码不能为空!"");location.href=""javascript:history.back()"";</script>" Response.end end if if Ku_CheckCode<>CStr(session("RndNum")) then Response.write"<script>alert(""验证码不正确,请刷新后重新登陆 "");location.href=""javascript:history.back()"";</script>" Response.end end if set rs=server.createobject("adodb.recordset") sql="select * from ku_user where username='"&username&"'and password='"&Md5_Pass&"'" rs.open sql,conn,1,3 if not rs.EOF then rs("loginhits")=rs("loginhits")+1 rs("LoginTime")=now() rs("jifen")=rs("jifen")+1 rs("LoginIP")=Request.ServerVariables("REMOTE_ADDR") rs.Update Response.Cookies("Ku_USER")("User_Name")=rs("username") Response.Cookies("Ku_USER")("User_Pwd")=rs("password") Response.Cookies("Ku_USER")("ku_vip")=rs("uservip") select case CookieDate case "0" Response.Cookies("Ku_USER")("CookieDate") = CookieDate case "1" Response.Cookies("Ku_USER").Expires=Date+1 Response.Cookies("Ku_USER")("CookieDate") = CookieDate case "2" Response.Cookies("Ku_USER").Expires=Date+31 Response.Cookies("Ku_USER")("CookieDate") = CookieDate case "3" Response.Cookies("Ku_USER").Expires=Date+365 Response.Cookies("Ku_USER")("CookieDate") = CookieDate end select Response.Redirect ("Gu_User.asp") else Response.write"<script>alert(""用户名or密码错误,请输入正确的帐号密码! "");location.href=""Index.asp"";</script>" Response.End end if rs.close set rs=nothing conn.close set conn=nothing end if %> <div align="center"> <table cellpadding="0" cellspacing="0" width="232"> <tr> <td height="30" background="Ku_img/login_001.jpg"><div id="dazi"> <b>会员登陆</b></div></td> </tr> <tr> <td height="100" background="Ku_img/login_002.jpg" valign="top"> <table cellpadding="0" cellspacing="0" width="232"> <tr> <td> <img border="0" src="pkxx-img/pkxxpz232-33.jpg" width="232"> </td> </tr> </table> <%if Request.Cookies("Ku_USER")("User_Name")="" then%> <div align="center"> <table border="0" width="97%" id="table1" height="100" cellpadding="0" cellspacing="0"> <form name="login" method="post" action="Index.asp?Action=logincheck"> <tr> <td width="35%"> <p align="right">登陆帐号:</td> <td width="62%"> <input type="text" name="username" size="16" onfocus="if(this.value=='请输入用户名') {this.value='';}this.style.color='#0000ff';" onblur="if(this.value=='') {this.value='请输入用户名';this.style.color='#ff0000';}" value="请输入用户名"></td> </tr> <tr> <td width="35%"> <p align="right">登陆密码:</td> <td width="62%"> <input type="password" name="password" size="16" style="background:URL(pkxx-Img/login_bg.gif) no-repeat left"> </td> </tr> <tr> <td width="35%" height="19"> <p align="right">状 态:</td> <td width="62%" height="19"> <select name="CookieDate"> <option selected value=0>不保存</option><option value=1>保存一天</option><option value=2>保存一月</option><option value=3>保存一年</option> </select> </td> </tr> <tr> <td width="35%"> <p align="right">验证码:</td> <td width="62%"> <input maxlength="4" type="text" name="CheckCode" size="8" > <img id="vcodeImg" src="about:blank" onerror="this.onerror=null;this.src='Ku_inc/Ku_code.asp?s='+Math.random();" alt="验证码" title="看不清楚?换一张" style="margin-right:1px;cursor:pointer;width:40px;height:12px" onclick="src='Ku_inc/Ku_code.asp?s='+Math.random()"/> </td> </tr> <tr> <td colspan="2" height="30" align="center"> <input type="image" src="pkxx-Img/button_login.gif" name="B1"> <a href="Ku_reg.asp?action=Agree" target="_blank"><img border="0" src="pkxx-Img/button_register.gif"></a> </td> </tr> <tr> <td colspan="2" height="30" align="center"> <a href="Gu_shangjia.asp" target="_blank"><img border="0" src="pkxx-Img/button_spzd.gif"></a> <a href="#" target="_blank"><img border="0" src="pkxx-Img/button_wjmm.gif"></a></td> </tr> <tr> <td colspan="2" height="30" align="center"> 【<font color="#ff0000"><%=Ku_name%></font>】竭诚为您服务! <br>服务热线:<font color="#ff0000"><%=Ku_tel%></font> </td> </tr> </table> </form> </div> <%else set rsus=server.createobject("adodb.recordset") sqlus="select * from ku_user where username='"&Request.Cookies("Ku_USER")("User_Name")&"'" rsus.open sqlus,conn,1,3 %> <div align="center"> <table border="0" width="202" height="100" cellpadding="0" cellspacing="0"> <tr> <td height="60" width="202"> <div align="center"> <table border="0" width="92%" id="table2" cellpadding="0" cellspacing="0"> <tr> <td> </td> <td> <p align="center"> <a href="Gu_user.asp?guxing=headpic"> <img border="0" src="<%if rsus("UserPhoto")<>"" then%><%=rsus("UserPhoto")%><%else%>Img/face/notx100-100.gif<%end if%>" height="70" width="80"></a> </td> <td width="2"> </td> </tr> </table> </div> </td> </tr> <tr> <td height="28" width="202" align="center"> 欢迎会员:<font color="#FF0000"><%=rsus("username")%></font> </td> </tr> <tr> <td height="21" width="202" align="center"> <a href="Gu_user.asp"><img border="0" src="pkxx-Img/button_hyzx.gif"></a> <a href="index.asp?Action=logout"><img border="0" src="pkxx-Img/button_out.gif"></a> <br> <a href="Gu_user.asp?guxing=putpk"><img border="0" src="pkxx-Img/button_addinfo.gif"></a> <a href="Gu_user.asp?guxing=edit_user"><img border="0" src="pkxx-Img/button_xgzl.gif"></a> </p> </td> </tr> <tr> <td colspan="2" height="30" align="center"> 【<font color="#ff0000"><%=Ku_name%></font>】竭诚为您服务! <br>服务热线:<font color="#ff0000"><%=Ku_tel%></font> </td> </tr> </table> </div> <%end if%> </td> </tr> <tr> <td height="2"> <img border="0" src="Ku_img/login_003.jpg" width="232" height="2"></td> </tr> <!--【拼客信息】页面-右边【会员登陆】下方广告位--> <br> <tr> <td height="5"></td> </tr> <br> <tr> <td width="230"><% Call Ku_AD(17) %></td> </tr> <!--【拼客信息】页面-右边【会员登陆】下方广告位--> </table> </div> <% if request("Action")="logout" then Response.Cookies("Ku_USER")("User_Name")="" Response.Cookies("Ku_USER")("User_Pwd")="" Response.Cookies("Ku_USER")("ku_vip")="" Response.Cookies("Ku_USER")("CookieDate") = "" Response.write"<script>alert(""您已安全退出!欢迎您下次光临!\n\n请推荐给您的好友,让好友一起来关注拼客活动!\n\n【茶都拼客网】tea.sdxmc.com 竭诚为广大拼客服务!"");location.href=""Index.asp"";</script>" end if %>